#!/bin/sh
mainpath=/data/provider-service
cd $mainpath

echo "stop service"
sh deploy/stop.sh
sleep 10

mkdir -p $mainpath/logs
mkdir -p $mainpath/lib
echo > $mainpath/logs/gc.log
echo > $mainpath/logs/spring.log
echo > $mainpath/logs/stderr.log
sleep 2

echo "rm lib/*"
rm -rf lib/*
cp $1 lib/

echo "start service"
sh deploy/start.sh
